<template>
  <div>
    <h1>{{articledetailsdata.title}}</h1>
    <span>{{articledetailsdata.createTime|formatTime}}</span>&nbsp;&nbsp;
    <span>{{articledetailsdata.creatorID | creatorname}}</span>&nbsp;&nbsp;
    <i class="el-icon-view"></i>&nbsp;&nbsp;
    <span>{{articledetailsdata.visits}}</span>
    <div v-html="articledetailsdata.articleBody"></div>
  </div>
</template>

<script>
export default {
  props: {
    articledetailsdata: {
      required: true,
      type: [Array, String, Object],
    },
  },
  methods: {},
  filters: {
    creatorname(val) {
      if (val === 2) {
        return '超级管理员';
      } else if (val === 3) {
        return '录入管理员';
      }
    },
  },
};
</script>

<style>
</style>
